/*
 * ImageElement.h
 *
 *  Created on: 2010-6-6
 *      Author: guobc
 */

#ifndef IMAGEELEMENT_H_
#define IMAGEELEMENT_H_

#include "CommonElement.h"

namespace HA {
class ImageElement: public HA::CommonElement {
public:
	ImageElement();

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Set src attribute of this element.
	 * @param url The new value of src attribute.
	 */
	inline void setImageURL(const string& url) {
		setAttribute("SRC", url);
	}

	inline string getImageURL() {
		return getAttribute("SRC");
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new ImageElement();
	}

private:
	static string mIds[];
};
}

#endif /* IMAGEELEMENT_H_ */
